package indigo.utils 
{
	import flash.system.Capabilities;
	/**
	 * The <code>PlayerInfo</class> provides information about the Flash player
	 * and operating system.
	 *
	 */
	public class PlayerInfo 
	{
		/**
		 * String that represents the Macintosh operating system
		 * 
		 */
		public static const OS_MAC:String = "MAC";		/**
		 * String that represents the Windows operating system
		 * 
		 */
		public static const OS_WIN:String = "WIN";		/**
		 * String that represents the Linuxoperating system
		 * 
		 */
		public static const OS_LINUX:String = "LNX";

		
		/**
		 * Number that indicates the major Flash version of the player running the SWF
		 * 
		 */
		public static function get flashVersion():Number
		{
			var myMajor:Array = fullFlashVersion.split( "," ); 
			return myMajor[ 0 ];
		}

		
		/**
		 * String that indicates the full Flash version of the player running the SWF
		 * 
		 */
		public static function get fullFlashVersion():String
		{
			var myVersion:Array = Capabilities.version.split( " " );
			return myVersion[ 1 ];
		}

		
		/**
		 * String that indicates the operating system that is running
		 * 
		 */
		public static function get operatingSystem():String
		{
			var myOS:Array = Capabilities.version.split( " " );
			return String( myOS[ 0 ] );
		}
	}
}
